# -*- coding:utf-8 -*-
import time
from time import sleep

from selenium import webdriver

# 创建驱动的时候 把options添加上
from selenium.webdriver.common.by import By

driver = webdriver.Chrome()

driver.get('https://i.qq.com/')
login_frame = driver.find_element_by_id('login_frame')
driver.switch_to.frame(login_frame)


switcher_plogin = driver.find_element_by_id('switcher_plogin')
switcher_plogin.click()

u = driver.find_element_by_id('u')
time.sleep(1)
u.send_keys('3114939465')
p = driver.find_element_by_id('p')
time.sleep(1)
p.send_keys('q1w2e1!(()')
time.sleep(1)

login_button = driver.find_element_by_id("login_button")
login_button.click()


sleep(5)
driver.quit()
